<template>
	<view>
		<!-- 最外面的盒子 -->
		<view class="bigbox">
			<!--  -->
			<view class="zhongbox1">
				<view class="libox">
					<view class="libox-left floatl">
						<view class="libox-wenzi">收货人</view>
					</view>
					<view class="libox-right floatl">
						<input class="libox-wenzi">{{addressList.linkMan}}</input>
					</view>
				</view>
				<view class="libox">
					<view class="libox-left floatl">
						<view class="libox-wenzi">手机号码</view>
					</view>
					<view class="libox-right floatl">
						<input class="libox-wenzi">{{addressList.mobile}}</input>
					</view>
				</view>
				<view class="libox">
					<view class="libox-left floatl">
						<view class="libox-wenzi">所在地区</view>
					</view>
					<view class="libox-right floatl">
						<input class="libox-wenzi">{{addressList.provinceStr}}{{addressList.areaStr}}</input>
					</view>
				</view>
				<view class="libox">
					<view class="libox-left floatl">
						<view class="libox-wenzi">详细地址</view>
					</view>
					<view class="libox-right floatl">
						<input class="libox-wenzi">{{addressList.address}}</input>
					</view>
				</view>
			</view>

			<view class="zhongbox1">
				<view class="libox">
					<view class="libox-left-two floatl">
						<view class="libox-wenzi">设为默认收货地址</view>
					</view>
					<view class="libox-right-two floatl">
						
						<u-icon name="arrow-right" class="tubiao"></u-icon>
					</view>
				</view>
			</view>

			<view class="zhongbox2">
				<view class="xinzbox"  @click="fh">
					<text>保存</text>
				</view>
			</view>

			<view class="zhongbox2">
				<view class="xinzbox2">
					<text>删除收货地址</text>
				</view>
			</view>



		</view>

	</view>
</template>

<script>
	import {
		_addressx
	} from "../../api/address-edit.js"
	export default {
		data() {
			return {
				addressList: [],
				id: ''
			}
		},
		methods: {
			getAddressList() {
				_addressx({
					id: this.id
				}).then(res => {
					// console.log(res)
					if (res.code === 0) {
						this.addressList = res.data.info
						console.log(this.addressList)
					}
				})
			},
			fh() {
				uni.navigateTo({
					url: "/pages/address/address"
				})
			}
		},
		onReady() {
			this.getAddressList()
		},
		onLoad(option) {
			this.id = option.id
			console.log(this.id)
		}
	}
</script>

<style>
	.bigbox {
		width: 750rpx;
		width: 100%;
		height: 600rpx;
		height: 100%;
		background-color: aqua;
		padding: 20rpx;
		background-color: #f7f8fa;
		position: fixed;
		position: relative;
	}

	.floatl {
		float: left;
	}

	.zhongbox1 {
		width: 710rpx;
		/* height: 400rpx; */
		background-color: white;
		box-sizing: border-box;
		border-radius: 20rpx;
		/* background-color: #1ba784; */
		margin-bottom: 20rpx;
	}

	.libox {
		width: 710rpx;
		height: 88rpx;
		padding: 20rpx;
		border-radius: 20rpx;
		background-color: white;
		box-sizing: border-box;
	}

	.libox-left {
		width: 174rpx;
		height: 48rpx;
		margin-right: 20rpx;
		/* background-color: green; */
	}

	.libox-right {
		width: 448rpx;
		height: 48rpx;
		/* background-color: green; */
	}

	.libox-wenzi {
		font-size: 30rpx;
		line-height: 48rpx;
	}

	.libox-left-two {
		width: 596rpx;
		height: 50rpx;
		margin-right: 20rpx;
		/* background-color: green; */
	}

	.libox-right-two {
		width: 50rpx;
		height: 50rpx;
		/* background-color: green; */

	}

	.tubiao {
		margin: 20prx auto;
	}

	.zhongbox2 {
		width: 710rpx;
		/* height: 400rpx; */
		background-color: white;
		box-sizing: border-box;
		border-radius: 50rpx;

		margin-bottom: 20rpx;
	}

	.xinzbox {
		width: 710rpx;
		height: 72rpx;
		margin: 18rpx auto;
		background-color: #1ba784;
		border-radius: 50rpx;
		border: 1rpx solid #1ba784;

		text-align: center;
		line-height: 72rpx;
		font-size: 30rpx;
		color: white;
	}

	.xinzbox2 {
		width: 710rpx;
		height: 72rpx;
		margin: 18rpx auto;
		/* background-color: #1ba784; */
		border-radius: 50rpx;
		/* border: 1rpx solid #1ba784; */

		text-align: center;
		line-height: 72rpx;
		font-size: 30rpx;
		/* color: white; */
	}
</style>
